package com.comment.util;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

/**
 * 验证类
 * 
 * @author Wangpeihu
 * @since 07/01/2010
 */
public class ValidateUtils {
	/**
	 * 返回了用户是否登录
	 * 
	 * @param request
	 * @return
	 */
	public static boolean validate(HttpServletRequest request) {
		HttpSession session = request.getSession();
		Object obj = session.getAttribute(Constants.ACCOUNT_KEY);
		if (obj != null) {
			return true;
		} else {
			return false;
		}
	}
}
